package cn.kgm.state;

import cn.kgm.state.impl.StartState;
import cn.kgm.state.impl.StopState;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2024-2-29 14:31
 * @Description: cn.kgm.state.StatePatternDemo
 */
public class StatePatternDemo {
    public static void main(String[] args) {
        Context context = new Context();

        StartState startState = new StartState();
        startState.doAction(context);

        System.out.println(context.getState().toString());

        StopState stopState = new StopState();
        stopState.doAction(context);

        System.out.println(context.getState().toString());
    }
}
